# 存放登录页面定位方法及元素
# !/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time   : 2023/05
# @Author : Renee

from selenium.webdriver.common.by import By
from pages.basepage import BasePage


class Login(BasePage):
    def __int__(self, driver):
        BasePage.__init__(self, driver)  # 初始化，调用basepage的init方法

    def input_zh(self, text):
        self.send_text(text, By.ID, "username")

    def input_mm(self, text):
        self.send_text(text, By.ID, "password")

    def click_login(self):
        self.left_click(By.XPATH,
                        "//body/div[@id='app']/div[1]/div[2]/div[1]/div[1]/div[4]/form[1]/div[4]/div[1]/div[1]/span[1]/button[1]")
    #
    # def click_bc(self):
    #     self.left_click(By.XPATH, '/html[1]/body[1]')
    #
    # def click_sz(self):
    #     self.left_click(By.XPATH, '/html[1]/body[1]/div[3]/div[1]/div[1]/div[2]/div[1]/ul[1]/li[3]')
